<template>
  <div class="tab-wrap">
    <Tabbar v-model="selected">
      <TabItem id="all">
        <i class="iconfont icon-all" slot="icon"></i>
        所有维修记录
      </TabItem>
      <TabItem id="takedOrder">
        <i class="iconfont icon-daiding" slot="icon"></i>
        已派单
      </TabItem>
      <TabItem id="repairDone">
        <i class="iconfont icon-yiwancheng" slot="icon"></i>
        已完成
      </TabItem>
      <TabItem id="me">
        <i class="iconfont icon-wodedangxuan" slot="icon"></i>
        我的
      </TabItem>
    </Tabbar>
  </div>
</template>

<script>
  import {Tabbar, TabItem} from 'mint-ui';

  export default {
    name: "tab-wrap",
    components: {
      Tabbar,
      TabItem
    },
    data() {
      return {
        selected: "all"
      }
    },
    watch: {
      selected(val) {
        console.log(val);
        this.$router.push({
          name: val
        })
      }
    }
  }
</script>

<style scoped lang="scss">
  .iconfont {
    font-size: 20px;
    color: #333;
  }
  /deep/ .is-selected {
    .iconfont {
      color: #26a2ff;
    }
  }
</style>
